<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think;
// 加载基础文件
require __DIR__ . '/../thinkphp/base.php';

if(!defined('WEBROOT'))
{
    $uri = explode('/',$_SERVER['DOCUMENT_URI']);
    $newarray = array();
    foreach($uri as $v){
        if($v == 'index.php')
            break;
        $newarray[] = $v;
    }
    $webroot = implode('/',$newarray);
    define('WEBROOT',$webroot);
}

// 执行应用并响应
Container::get('app')->run()->send();
